#!/bin/csh
#gen_pbs version: 1.0.3
#PBS -A account
#PBS -q standard
#PBS -l walltime=12:00:00
#PBS -l select=1:ncpus=32:mpiprocs=16
#PBS -N J_u3o8_clstr
#PBS -joe
#PBS -e u3o8_clstr.oe
#PBS -o u3o8_clstr.oe
#PBS -M paul.adamson.01@gmail.com
#PBS -mbe

#set EXEC = 'aprun -n 16 /usr/local/usp/nwchem/6.3-pgi/bin/nwchem'
set EXEC = 'aprun -n 16 /usr/local/usp/nwchem/6.1.1/bin/nwchem'

export HUGETLB_MORECORE=yes
export HUGETLB_ELFMAP=W
export HUGETLB_FORCE_ELFMAP=yes+
#export MPI_DSM_DISTRIBUTE=yes
export APRUN_BALANCED_INJECTION=64

# create a job-specific subdirectory based on JOBID and cd to it
set JOBID = `echo ${PBS_JOBID} | cut -d '.' -f 1`
set SCR = ${WORKDIR}/${JOBID}
mkdir $SCR
cd $SCR

echo "Job $PBS_JOBID "u3o8_clstr" started on `date` running on `hostname`">cluster_clstr.log

#set i = 1
#while ($i <= 10)
  cp $HOME/anneal/u3o8/cluster_clstr.nw $SCR/.

  $EXEC cluster_clstr.nw > cluster_clstr.out

  cp cluster_clstr.out $HOME/anneal/u3o8/.

  #@ i++
#end

echo "Job ended on `date`">>cluster_clstr.log

cp cluster_clstr.log $HOME/anneal/u3o8/.

